<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <input type="button" value="btn" id="btn1">
  <input type="button" value="btn" id="btn2">
  <p>111</p>
  <input type="button" value="btn" id="btn3">
  <input type="button" value="btn" id="btn4">
  <p>222</p>
  <input type="button" value="btn" id="btn5">
  <input type="button" value="btn" id="btn6">
  <input type="button" value="btn" id="btn7">
  <p>333</p>
  <input type="button" value="btn" id="btn8">
  <input type="button" value="btn" id="btn9">
  <input type="button" value="btn" id="btn10">
</body>
<script>
  function getBtn1(){
    let btn1 = document.getElementById('btn1');
    let btn3 = document.getElementById('btn3');
    let btn5 = document.getElementById('btn5');
    let btn7 = document.getElementById('btn7');
    let btn9 = document.getElementById('btn9');
  }

  function getBtn2(){
    const doc = document;
    let btn1 = doc.getElementById('btn1');
    let btn3 = doc.getElementById('btn3');
    let btn5 = doc.getElementById('btn5');
    let btn7 = doc.getElementById('btn7');
    let btn9 = doc.getElementById('btn9');
  }
</script>

</html>